package com.kly.chatter.api.application.service.impl;

import com.kly.chatter.api.application.controller.chatter.req.ChatterConversationLogReq;
import com.kly.chatter.api.application.service.ChatterConversationLogService;
import com.kly.chatter.db.dao.ChatterConversationLogDao;
import com.kly.chatter.db.entity.ChatterConversationLogEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ChatterConversationLogServiceImpl implements ChatterConversationLogService {

    @Autowired
    private ChatterConversationLogDao chatterConversationLogDao;

    @Override
    public void addChatterConversationLog(ChatterConversationLogReq chatterConversationLogReq) {
        ChatterConversationLogEntity chatterConversationLogEntity=new ChatterConversationLogEntity();
        chatterConversationLogEntity.setChatterCode(chatterConversationLogReq.getChatterCode());
        chatterConversationLogEntity.setModelCode(chatterConversationLogReq.getModelCode());
        chatterConversationLogEntity.setInternet(chatterConversationLogReq.getInternet());
        chatterConversationLogEntity.setDriver(chatterConversationLogReq.getDriver());
        chatterConversationLogEntity.setMessage(chatterConversationLogReq.getMessage());
        chatterConversationLogDao.insert(chatterConversationLogEntity);
    }
}
